const axios = require('axios');
const FormData = require('form-data');
axios.defaults.withCredentials = true

let mydata = new FormData();
mydata.append('Cookie', "token=it_token:1656853695.91139584578");
mydata.append('Accept', "application/json, text/plain, */*");
mydata.append('Content-Type', "application/json;charset=UTF-8");

axios({
    method: 'POST',
    // url: 'http://tcoa.17usoft.com/platform/EmployeeBase/WorkExperienceListBind',
    // url: 'https://bbs.fanruan.com/plugin.php?id=votes:vote&act=poll&appid=1304&formhash=e9800bde',
    url: 'https://bbs.fanruan.com/plugin.php?id=votes:vote&act=poll&appid=1303&formhash=789fil98',
    headers: {
        // 'authority': 'bbs.fanruan.com',
        'method': 'POST',
        'path': '/plugin.php?id=votes:vote&act=poll&appid=1303&formhash=789fil98',
        'scheme': 'https',
        'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
        // 'Accept-Encoding': "gzip, deflate",
        // 'Accept-Language': "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,ko-KR;q=0.6,ko;q=0.5,ja-JP;q=0.4,ja;q=0.3",
        // "Cache-Control": "no-cache",
        // "Connection": "keep-alive",
        // "Content-Length": "0",
        // "Cookie": `fr_id_appname=shequ; fr_id_userinfo=09f55d26876068fd44232c79987bc79e744b8c84bb36c9c59f846472502a0d1f0ad4a9f2a2bed13843a3a3992d28b953d19ac9c356ecac6ec735e8c98a50532ada453f471745e99ce4b59f5083fae7a10c185d59bba0cbfb75413eec2a0a4fc5383efe8ebb96528f5388d0a41a3fd19a98ee54551c4c7393afe6f783442c13dafc4a68e604926335a3f1c283a1897142b3b310ad15e1cead0581dd2b000d186b9dc24a7d64f520d50422cf3cb25f7ccacb9f642be286fa1f43651075f885660c6cc63efb8bcf32e3e2f90982d464cda89d0251fce6301fc522dd82159828c10278c6dbca343ac180158f35c949f9eeab3d339acbdd188210615f55f7a5; 22lF_e225_connect_is_bind=0; Hm_lvt_bfbe574dd029f3d4e057905d5aa4ba41=1653028154; Hm_lvt_b34b52d2b268ff53ddc20cfa751b5f42=1653028154; hy_data_2020_id=180e027ea141b7-0a84223126eef5-34736704-1024000-180e027ea151e51; hy_data_2020_js_sdk={"distinct_id":"180e027ea141b7-0a84223126eef5-34736704-1024000-180e027ea151e51","site_id":1235,"user_company":1350,"props":{},"device_id":"180e027ea141b7-0a84223126eef5-34736704-1024000-180e027ea151e51"}; gr_user_id=db0c7177-e1e1-4113-9640-856a60b34334; _ga_8JXGBBBC23=GS1.1.1653027965.1.1.1653028362.0; Hm_lvt_a9864996fe8e9817d874d9b76f3ba5ed=1657070037; Hm_lvt_c53f56f08e83dd4654dcd9bc91304a8a=1657070037; Qs_lvt_416686=1653028153,1657070037,1657070061,1657070706; _ga=GA1.1.1651738501.1653027966; Qs_pv_416686=1458391601780195600,3589247252836703700,3465688373150011000,49946750187543390,3791632874155988000; _ga_QP9FB11DNS=GS1.1.1657070706.1.1.1657072229.0; 22lF_e225_saltkey=LqnNN0KI; 22lF_e225_lastvisit=1658118465; 22lF_e225_st_p=1001478|1658122065|0dcba07910c8605f7a704da924d778a9; 22lF_e225_viewid=tid_141175; 22lF_e225_ulastactivity=1658122065|0; 22lF_e225__refer=%2Fhome.php%3Fmod%3Dspacecp%26ac%3Dpm%26op%3Dchecknewpm%26rand%3D1658122065; 22lF_e225_smile=1D1; Hm_lvt_77e6328829d243222ff758d79882627e=1658122067; 22lF_e225_home_diymode=1; 22lF_e225_sendmail=1; Hm_lpvt_77e6328829d243222ff758d79882627e=1658123896; 22lF_e225_lastact=1658123971	plugin.php	`,
        // 'DNT': '1',
        // 'Host': ' tcoa.17usoft.com',
        'Origin': 'https://bbs.fanruan.com',
        // 'Pragma': 'no-cache',
        'Referer': 'https://bbs.fanruan.com/thread-141172-1-1.html',
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36',
        // 'X-Requested-With': 'XMLHttpRequest'
    } 

}).then(res => {
    console.log('save', res.data)
}).catch(err => {
    console.log(err)
})